gem nohu giauto
sumvip 6 city
ae888 165 215
f8bet online
gem nohu giauto
sumvip 6 city
ae888 165 215
f8bet online

ae888 link vào trang chủ

$6

Hey everyone. Searching around, I see tons of answers related to converting numerical bytes into KB

Quantity
Add to wish list
Product description



  Hey everyone. Searching around, I see tons of answers related to converting numerical bytes into KB/MB/GB/TB. However, I can't seem to find any answers going in the other direction.

  We have fields that can have values formatted as any of the following

  123B

  123KB

  123MB

  123GB

  123TB

  The unit used can vary by event. So the same field might be 123B in one event, then 123MB in the next event, and 123KB in the next one. I want to strip the unit off, and convert everything into bytes (I don't mind trailing zeros). How would I go about doing this?

  I am assuming I would need to strip the value, convert to a number, but how would I do an "if" if the unit type has already been stripped?

Related products